<?php $this->load->view('tourism/layout/header') ?>
<div class="page1">
<header class="shopping-head">
    <ul class="am-cf">
        <li class="shopping-input Toprev" style="width: 82%;margin-left: 3%;">
            <div>搜索站点内商品</div>
            <i class="iconfont icon-sousuo"></i>
        </li>
        <li class="offer-more">
            <a href="<?php echo site_url('home/ucenter/helpCenter') ?>">
                <i class="iconfont icon-kefu"></i>
            </a>
        </li>
    </ul>
</header>
<div class="widthMax offer-bg shopping-bg">
    <?php if(count($advert_img) > 0):?>
        <div class="shopping-img am-slider am-slider-default" data-am-flexslider id="demo-slider-0">
            <ul class="am-slides">
                <?php foreach ($advert_img as $image_name): ?>
                    <li>
                        <a href="<?php echo $image_name->openvar;?>">
                            <img src="<?php echo $this->config->show_image_url($image_name->picture);?>" />
                        </a>
                    </li>
                <?php endforeach;?>
            </ul>
        </div>
    <?php else: ?>
        <div class="offer-img">
            <img src="<?php echo $this->config->show_image_url($providerInfor->wap_image);?>"/>
        </div>
    <?php endif;?>
    <div class="offer-nav">
        <ul class="am-cf">
            <li>
                <a href="<?php echo site_url('tourism/tourismprovider/allProduct');?>">
                    <p>全部商品</p>
                </a>
            </li>
            <li>
               <a href="<?php echo site_url('tourism/tourismprovider/intro');?>">
                   <p>站点简介</p>
               </a>
            </li>
            <li>
                <a href="<?php echo site_url('tourism/tourismprovider/news');?>">
                    <p>新闻动态</p>
                </a>
            </li>
            <li class="nav-letter">
               <a href="javascript:;" class="sales-share" data-link="<?php echo current_url();?>" data-name="<?php echo isset($providerInfor->name) ? $providerInfor->name : '着想科技';?>" data-img="<?php echo $this->config->show_image_url($providerInfor->wap_image);?>">
                   <p><i class="iconfont icon-fenxiang"></i><span>分享</span></p>
               </a>
            </li>
        </ul>
    </div>
<?php if($mainProduct->num_rows() > 0):?>
<div class="offer-price">
     <div class="offer-title"><p>每日特价</p></div>
     <div class="offer-waper">
        <div class="offer-scroller" style="width:<?php echo (($mainProduct->num_rows())*7.5).'rem';?>">
            <ul class="am-cf">
            <?php foreach ($mainProduct->result() as $item):?>
                <li>
                  <a href="<?php echo site_url('tourism/goods/info/'.$item->goods_attr_id)?>" title="<?php echo $item->goods_name ?>">
                    <img class="lazy" src="<?php echo $this->config->show_image_url($item->images, '200-200') ?>" />
                    <p>￥<?php echo isset($item->shop_price) ? $item->shop_price :'';?></p>
                  </a>
                </li>
            <?php endforeach;?>
            </ul>
        </div>
    </div>
</div>
<?php endif;?>
<?php if ($providerCategory->num_rows() > 0): ?>
<?php $color = array('one','two','three');?>
<div class="offer-hot">
    <div class="offer-title">
        <p>热门分类</p>
    </div>
    <ul class="am-cf">
        <?php foreach ( $providerCategory->result() as $val ):?>
        <li class="lable-<?php echo $color[($val->id)%2];?>"><a href="<?php echo site_url('tourism/tourismprovider/allProduct').'?category_id='.$val->id;?>"><?php echo $val->category_name;?></a></li>
        <?php endforeach;?>
    </ul>
</div>
<?php endif;?>
<?php if($recommendProduct->num_rows() > 0):?>
<div class="offer-product">
    <div class="product-title">
        <p>推荐产品</p>
    </div>
    <ul class="am-cf provider-product-list">
         <?php $this->load->view('tourism/tourismprovider/providerlist')?>
    </ul>
    <a class="offer-more-show" href="<?php echo site_url('tourism/tourismprovider/allProduct');?>">查看更多</a>
</div>
<?php endif;?>
</div>
</div>
<?php $this->load->view('tourism/tourismprovider/search');?>
<footer class="shopping-footer">
    <ul class="am-cf">
        <li>
            <a class="active" href="<?php echo site_url('tourism/tourismprovider/grid') ?>">
                <i class="iconfont am-color icon-shouye"></i>
                <p>首页</p>
            </a>
        </li>
        <li>
            <a href="<?php echo site_url('home/discountMall/protection'); ?>">
                <i class="iconfont icon-tubiao-"></i>
                <p>消费保障</p>
            </a>
        </li>
        <li>
            <a href="<?php echo site_url('tourism/tourismcart');?>">
                <i class="iconfont icon-gouwuche"></i>
                <p>购物车</p>
            </a>
        </li>
        <li>
            <a href="<?php echo site_url('home/ucenter/index');?>">
                <i class="iconfont icon-wode"></i>
                <p>我的</p>
            </a>
        </li>
    </ul>
</footer>
<div data-am-widget="gotop" class="am-gotop am-gotop-fixed return-head">
    <a href="#top" title="回到顶部">
        <i class="iconfont icon-huidaodingbu"></i>顶部
    </a>
</div>
<?php $this->load->view('tourism/tourismprovider/share');?>
<?php $this->load->view('tourism/layout/footer')?>
